3.11 \(\int \log ^2(c x) \, dx\)

Optimal. Leaf size=19 \[ x \log ^2(c x)-2 x \log (c x)+2 x \]

[Out]

2*x-2*x*ln(c*x)+x*ln(c*x)^2

________________________________________________________________________________________

Rubi [A]  time = 0.00, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2296, 2295} \[ x \log ^2(c x)-2 x \log (c x)+2 x \]

Antiderivative was successfully verified.

[In]

Int[Log[c*x]^2,x]

[Out]

2*x - 2*x*Log[c*x] + x*Log[c*x]^2

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

Rubi steps

\begin {align*} \int \log ^2(c x) \, dx &=x \log ^2(c x)-2 \int \log (c x) \, dx\\ &=2 x-2 x \log (c x)+x \log ^2(c x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 19, normalized size = 1.00 \[ x \log ^2(c x)-2 x \log (c x)+2 x \]

Antiderivative was successfully verified.

[In]

Integrate[Log[c*x]^2,x]

[Out]

2*x - 2*x*Log[c*x] + x*Log[c*x]^2

________________________________________________________________________________________

fricas [A]  time = 0.40, size = 19, normalized size = 1.00 \[ x \log \left (c x\right )^{2} - 2 \, x \log \left (c x\right ) + 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x)^2,x, algorithm="fricas")

[Out]

x*log(c*x)^2 - 2*x*log(c*x) + 2*x

________________________________________________________________________________________

giac [A]  time = 0.18, size = 19, normalized size = 1.00 \[ x \log \left (c x\right )^{2} - 2 \, x \log \left (c x\right ) + 2 \, x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x)^2,x, algorithm="giac")

[Out]

x*log(c*x)^2 - 2*x*log(c*x) + 2*x

________________________________________________________________________________________

maple [A]  time = 0.03, size = 20, normalized size = 1.05 \[ x \ln \left (c x \right )^{2}-2 x \ln \left (c x \right )+2 x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*x)^2,x)

[Out]

2*x-2*x*ln(c*x)+x*ln(c*x)^2

________________________________________________________________________________________

maxima [A]  time = 0.48, size = 16, normalized size = 0.84 \[ {\left (\log \left (c x\right )^{2} - 2 \, \log \left (c x\right ) + 2\right )} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*x)^2,x, algorithm="maxima")

[Out]

(log(c*x)^2 - 2*log(c*x) + 2)*x

________________________________________________________________________________________

mupad [B]  time = 3.59, size = 16, normalized size = 0.84 \[ x\,\left ({\ln \left (c\,x\right )}^2-2\,\ln \left (c\,x\right )+2\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*x)^2,x)

[Out]

x*(log(c*x)^2 - 2*log(c*x) + 2)

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 19, normalized size = 1.00 \[ x \log {\left (c x \right )}^{2} - 2 x \log {\left (c x \right )} + 2 x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*x)**2,x)

[Out]

x*log(c*x)**2 - 2*x*log(c*x) + 2*x

________________________________________________________________________________________